import { ecs } from "../../core/ecs/ECS";
import { GateModel } from "./model/GateModel";
import { GateServerStartComp, GateServerStartSystem } from "./sys/GateServerStartSys";

@ecs.register(`GateServer`)
export class GateServer extends ecs.Entity {
    GateModel!: GateModel;

    protected init() {
        this.addComponents<ecs.Comp>(
            GateModel);
    }

    /** 开启网关服务器 */
    start() {
        this.add(GateServerStartComp);
    }
}

export class EcsGateSystem extends ecs.System {
    constructor() {
        super();

        this.add(new GateServerStartSystem());
    }
}